module.exports = {
  async fetch({ args,page }) {
   
    url = `http://baobab.kaiyanapp.com:80/api/v3/specialTopics?start=${page||0}&num=10`
    let resp = await $http.get(url)
    
  
    let list = resp.data.itemList
    let items = list.map(data => {
 
        return {
          title: data.data.title,
          style: 'gallery',
          thumb: data.data.image,
          spanCount: 12,
          route: $route('top', {
            id: data.data.id
          })
        }
    })

    return {
      nextPage:page+10,
      items: items
    }
  }
}
